﻿using RentHouse.DTO;
using RentHouse.IService;
using RentHouse.Service.Entityes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RentHouse.Service
{
    public class CitiesService : ICitiesService
    {
        public List<CityDTO> GetList()
        {
            var db = new RentHouseEntity();
            BaseService<T_Cities> bs = new BaseService<T_Cities>(db);
            var list = bs.GetList(e => true).Select(e => new CityDTO
            {
                Id = e.Id,
                Name = e.Name
            }).ToList();
            return list;
        }
    }
}
